package com.geeka.d08;

import java.text.ParseException;
import java.text.SimpleDateFormat;

public class TestExThrow {
    public static void main(String[] args) {
        try {
            testException();
        } catch (ParseException e) {
            e.printStackTrace();
        }

        System.out.println("hello world");
    }
    // parse的异常,我不管,抛出去, 谁调用谁处理
    public static void testException() throws ParseException {
        String date = "2023-09-09日 12:00:00";
        SimpleDateFormat sdf2 = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        sdf2.parse(date);
    }
}
